import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '销货单位',
    align:"center",
    dataIndex: 'saleCompany'
   },
   {
    title: '地址',
    align:"center",
    dataIndex: 'saleAddr'
   },
   {
    title: '税号',
    align:"center",
    dataIndex: 'saleTaxNo'
   },
   {
    title: '开户银行',
    align:"center",
    dataIndex: 'saleBank'
   },
   {
    title: '账号',
    align:"center",
    dataIndex: 'saleBankCard'
   },
   {
    title: '购货单位',
    align:"center",
    dataIndex: 'buyCompany'
   },
   {
    title: '地址',
    align:"center",
    dataIndex: 'buyAddr'
   },
   {
    title: '税号',
    align:"center",
    dataIndex: 'buyTaxNo'
   },
   {
    title: '开户银行',
    align:"center",
    dataIndex: 'buyBank'
   },
   {
    title: '账号',
    align:"center",
    dataIndex: 'buyBankCard'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
     {
      label: "销货单位",
      field: "saleCompany",
      component: 'JInput', //TODO 范围查询
      colProps: {span: 6},
	},
	{
      label: "税号",
      field: 'saleTaxNo',
      component: 'JInput',
      colProps: {span: 6},
 	},
     {
      label: "购货单位",
      field: "buyCompany",
      component: 'JInput', //TODO 范围查询
      colProps: {span: 6},
	},
	{
      label: "税号",
      field: 'buyTaxNo',
      component: 'Input',
      colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '销货单位',
    field: 'saleCompany',
    component: 'Input',
  },
  {
    label: '地址',
    field: 'saleAddr',
    component: 'Input',
  },
  {
    label: '税号',
    field: 'saleTaxNo',
    component: 'Input',
  },
  {
    label: '开户银行',
    field: 'saleBank',
    component: 'Input',
  },
  {
    label: '账号',
    field: 'saleBankCard',
    component: 'Input',
  },
  {
    label: '购货单位',
    field: 'buyCompany',
    component: 'Input',
  },
  {
    label: '地址',
    field: 'buyAddr',
    component: 'Input',
  },
  {
    label: '税号',
    field: 'buyTaxNo',
    component: 'Input',
  },
  {
    label: '开户银行',
    field: 'buyBank',
    component: 'Input',
  },
  {
    label: '账号',
    field: 'buyBankCard',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];



/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}
